﻿<%@ Page Language="C#" MasterPageFile="~/Shared/MainPage.Master" AutoEventWireup="true" CodeBehind="BillAssign.aspx.cs" Inherits="Runda.CMS.Portal.ContractFollowUp.BillAssign" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphHead" runat="server">
<script src="../Content/lookup/Lookup.js" type="text/javascript"></script>

    <link href="../Content/Form/form.css" rel="Stylesheet" type="text/css" />
    <script src="../Content/global.js" type="text/javascript"></script>

    <link href="../Content/global.css" rel="stylesheet" type="text/css" />
    <link href="../Content/Menu/Menu.css" rel="stylesheet" type="text/css" />
    <link href="../Content/Find/find.css" rel="stylesheet" type="text/css" />
    <link href="../Content/Grid/Grid.css" rel="stylesheet" type="text/css" />

    <script src="../Content/Grid/map_grid.js" type="text/javascript"></script>

    <link href="../Content/Pager.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" src="../Content/jquery-1.3.2.js"></script>

    <script type="text/javascript" src="../Content/Bussiness/GenData.js"></script>
    <script type="text/javascript"src="../Content/lookup/Lookup.js"></script>
    <script type="text/javascript">
        function OpenEditRegister(id) {
            openMyWin('TaskRegisterBasic.aspx?RegisterID=' + id, 'RegisterInfo', 800, 600);
        }
        function refreshList(){ 
        
            gendata('registertask');
             
        }
   
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphBody" runat="server">
    <div class="Container">
        <table id="appFind" class="find" cellspacing="0" cellpadding="0" border="0">
            <tbody>
                <tr height="23">
                    <td class="wizHead" colspan="7">
                        <table style="table-layout: fixed; font-size: 9pt" cellspacing="0" cellpadding="0"
                            width="100%" height="100%">
                            <colgroup>
                                <col>
                                <col width="120">
                                <col width="120">
                                <tr>
                                    <td style="color: #ffffff">
                                        <b>快速查询</b>
                                    </td>
                                    <td class="icMenu mnuRight" nowrap>
                                    <asp:LinkButton ID="lnkbtnSaveAndNew" runat="server" OnClientClick="refreshList();"><span class="menu" title="批量生成注册单"><img class="mnuBtn" src="../Content/Menu/SaveNew_16_blue.gif"><span class="mnuBtn">批量生成注册单</span></span></asp:LinkButton>
                                    </td>
                                </tr>
                        </table>
                    </td>
                </tr>
                <tr id="__appFind_trQuery" height="40">
                    <td class="wizBox1" colspan="7">
                        <table id="__appFind_tbQuery1" style="table-layout: fixed; font-size: 9pt" height="100%"
                            cellspacing="0" cellpadding="0" width="100%">
                            <tr>
                                <td align="right">
                                    按客户名称或区域：
                                </td>
                                <td>
                                    <asp:TextBox ID="txtContractCodeBasic" runat="server" Width="100px" CssClass="input"></asp:TextBox>
                                </td>
                                <td align="right">
                                    工作类型：
                                </td>
                                <td>
                                    <asp:DropDownList runat="server" ID="TaskType">
                                    </asp:DropDownList>
                                </td>
                                <td align="right">
                                    仪器名称：
                                </td>
                                <td>
                                    <asp:TextBox ID="txtInstrument" runat="server" Width="100px" CssClass="input"></asp:TextBox>
                                </td>
                                <td align="right">
                                    负责人/工程师：
                                </td>
                                <td>
                                    <asp:TextBox ID="txtPerformPerson" runat="server" Width="100px" CssClass="input"></asp:TextBox>
                                </td>
                                <td>
                                    <asp:Button ID="btnSearchBasic" runat="server" Text="查找" CssClass="button" OnClick="btnSearch_Click" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
    <div class="Container">
        <table class="mnubar" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td style="padding-left: 5px" nowrap>
                        <b>派工列表</b>
                    </td>
                    <td style="padding-left: 5px">
                        <img src="../Content/Grid/separator.gif">
                    </td>
                    <td class="icMenu" nowrap>
                    </td>
                    <td class="icMenu mnuRight" nowrap>
                  
                    </td>
                </tr>
            </tbody>
        </table>
        <div style="border-bottom: #c2c2bf 1px solid; border-top: #969693 1px solid">
        </div>
        <asp:Repeater ID="RepeaterUsers" runat="server" OnItemCommand="RepeaterUsers_ItemCommand"
            OnItemDataBound="RepeaterUsers_ItemDataBound">
            <HeaderTemplate>
                <table id="grid" class="grid" cellspacing="0" cellpadding="0">
                    <tbody>
                        <tr class="header">
                         <td align="middle" style="width:3%">
                                <div>
                                    <div style="display: inline; float: left; height: auto; overflow: hidden; width: 96%;
                                        text-align: center;">
                                        选择</div>
                                    <div style="display: inline; float: right; height: auto; overflow: hidden;">
                                        <img src="../Content/Grid/bar_line.gif" border="0"></div>
                                </div>
                            </td>
                            <td align="middle" style="width:20%">
                                <div>
                                    <div style="display: inline; float: left; height: auto; overflow: hidden; width: 96%;
                                        text-align: center;">
                                        客户名称</div>
                                    <div style="display: inline; float: right; height: auto; overflow: hidden;">
                                        <img src="../Content/Grid/bar_line.gif" border="0"></div>
                                </div>
                            </td>
                           <td align="middle" style="width:10%">
                                <div>
                                    <div style="display: inline; float: left; height: auto; overflow: hidden; width: 96%;
                                        text-align: center;">
                                        所在区域</div>
                                    <div style="display: inline; float: right; height: auto; overflow: hidden;">
                                        <img src="../Content/Grid/bar_line.gif" border="0"></div>
                                </div>
                            </td>
                            
                            <td align="middle" style="width:10%">
                                <div>
                                    <div style="display: inline; float: left; height: auto; overflow: hidden; width: 96%;
                                        text-align: center;">
                                        工作类型</div>
                                    <div style="display: inline; float: right; height: auto; overflow: hidden;">
                                        <img src="../Content/Grid/bar_line.gif" border="0"></div>
                                </div>
                            </td>
                             <td align="middle" style="width:15%">
                                <div>
                                    <div style="display: inline; float: left; height: auto; overflow: hidden; width: 96%;
                                        text-align: center;">
                                        仪器名称</div>
                                    <div style="display: inline; float: right; height: auto; overflow: hidden;">
                                        <img src="../Content/Grid/bar_line.gif" border="0"></div>
                                </div>
                            </td>
                             <td align="middle" style="width:15%">
                                <div>
                                    <div style="display: inline; float: left; height: auto; overflow: hidden; width: 96%;
                                        text-align: center;">
                                        期望完成日期</div>
                                    <div style="display: inline; float: right; height: auto; overflow: hidden;">
                                        <img src="../Content/Grid/bar_line.gif" border="0"></div>
                                </div>
                            </td>
                            <td align="middle" style="width:10%">
                                <div>
                                    <div style="display: inline; float: left; height: auto; overflow: hidden; width: 96%;
                                        text-align: center;">
                                        负责人</div>
                                    <div style="display: inline; float: right; height: auto; overflow: hidden;">
                                        <img src="../Content/Grid/bar_line.gif" border="0"></div>
                                </div>
                            </td>
                            
                            <td style="width:2%">
                                <asp:ImageButton ID="imgbtnRefersh" CommandName="refersh" runat="server" ImageUrl="../Content/Grid/grid_Refresh.gif"
                                    AlternateText="刷新列表" />
                            </td>
                        </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr class="data" ondblclick="OpenEditRegister('<%#Eval("RegisterID") %>')" onclick="handleClick()">
                <td>
                    <asp:CheckBox ID="isCheck" runat="server" Width="15px" />
                </td>
                    <td>
                        <asp:Label runat="server" ID="CustomerID" Text='<%#Eval("CustomerID") %>' Visible="false"></asp:Label>
                        <asp:Label runat="server" ID="CustomerName"></asp:Label>
                        <asp:Label runat="server" ID="RegisterID" Text='<%# Eval("RegisterID") %>' Visible="false"></asp:Label>
                    </td>
                    <td>
                         <asp:Label runat="server" ID="CustomerArea"></asp:Label>
                    </td>
                    <td>
                        <asp:Label runat="server" ID="TaskType" Text='<%# Eval("TaskType")%>' Visible="false"></asp:Label>
                        <asp:Label runat="server" ID="TaskTypeName"></asp:Label>
                    </td>
                    <td>
                        <asp:Label runat="server" ID="InstrumentID" Text='<%# Eval("InstrumentID")%>' Visible="false"></asp:Label>
                        <asp:Label runat="server" ID="Instrumentname"></asp:Label>
                    </td>
                     <td>
                        <%# Eval("ExpectEndDate")%>
                    </td>
                    <td>
                        <asp:Label runat="server" ID="PerformPerson" Text='<%# Eval("PerformPerson")%>' Visible="false"></asp:Label>
                        <asp:Label runat="server" ID="PerformPersonName"></asp:Label>
                    </td>
                    
                    <td>
                    </td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
                </tbody> </table>
            </FooterTemplate>
        </asp:Repeater>
        <webdiyer:AspNetPager ID="AspNetPager1" runat="server" CssClass="paginator" CurrentPageButtonClass="cpb"
            CustomInfoHTML="第%CurrentPageIndex%页，共%PageCount%页，每页%PageSize%条" FirstPageText="首页"
            LastPageText="尾页" NextPageText="下一页" PrevPageText="上一页" ShowCustomInfoSection="Left"
            Width="100%" LayoutType="Table" SubmitButtonClass="but" SubmitButtonText="转到"
            OnPageChanged="AspNetPager1_PageChanged" PageSize="20">
        </webdiyer:AspNetPager>
    </div>
     <div style="border-bottom: #c2c2bf 1px solid; border-top: #969693 1px solid">
        </div>
        <div style="margin: 5px 0 5px 0">
        </div>
        <table class="mnubar" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td style="padding-left: 5px" nowrap>
                        <b>分派人</b>
                    </td>
                    <td style="padding-left: 5px">
                        <img src="../Content/Grid/separator.gif">
                    </td>
                    <td class="icMenu" nowrap>
                    </td>
                    <td class="icMenu mnuRight" nowrap>
                    </td>
                </tr>
            </tbody>
        </table>
        <table>
        <tr>
            <td style="width:50px">
                执行人
            </td>
            <td style="width:300px">
                <table cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed;">
                    <tr>
                        <td nowrap>
                            <div class="lu">
                                <span class="lui" oid="" onclick="openlui();"></span>
                                <asp:Label ID="employeeName" runat="server"></asp:Label></div>
                        </td>
                        <td width="25" style="text-align: right;">
                            <img class="lu2" lookupbrowse="" lookupstyle="single" lookupclass="" features="dialogWidth:360px;dialogHeight:500px;resizable:yes;center:yes;status:no;help:no;scroll:no;"
                                lookupcustom="/Lookup/selectcustomeroflookup.aspx?title=user&department=maintain" src="/Images/btn_off_lookup.gif"><input
                                    maptype="lu" class="lu" type="hidden" name="employeeGUID" value="" runat="server"
                                    id="employeeGUID" />
                        </td>
                        <td> <asp:Button ID="btnAssign" runat="server" Text="分派" CssClass="button" OnClick="btnAssign_Click" /></td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <div id="__divRuning" style="position: absolute; z-index: 108; width: 260px; height: 47px;
        background-color: white; border: #9E9E9B 1px solid; font: bold 14px; color: #FF5A00;
        text-align: center; padding-top: 16px; display: none;">
        数据正在生成，请稍候...
    </div>        
</asp:Content>
